package com.codecrane.core.util;

/**
 * Created by 752322896 on 2019/4/8.
 */
public enum NewProductStatusEnum {
    已企划(1, "待来样"),
    待来样(2, "待评审"),
    待评审(3, "待建档"),
    待建档(4, "待下单"),
    待下单(5, "待出运"),
    待出运(6, "待上新"),
    已上新(7, "已上新"),
    来样关闭(21, "来样关闭"),
    评审拒绝(31, "评审拒绝"),
    评审关闭(32, "评审关闭");

    private int code;
    private String msg;

    NewProductStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    /**
     * 根据充值类型获取充值的天数
     */
    public static String getStatus(int code) {
        for (NewProductStatusEnum countryEnum : NewProductStatusEnum.values()) {
            if (code == countryEnum.getCode()) {
                return countryEnum.getMsg();
            }
        }
        return "";
    }
}
